import service from '@/utils/request'
// @Tags Members
// @Summary 创建members表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Members true "创建members表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /hairmember/members/createMembers [post]
export const createMembers = (data) => {
  return service({
    url: '/hairmember/members/createMembers',
    method: 'post',
    data
  })
}

// @Tags Members
// @Summary 删除members表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Members true "删除members表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /hairmember/members/deleteMembers [delete]
export const deleteMembers = (params) => {
  return service({
    url: '/hairmember/members/deleteMembers',
    method: 'delete',
    params
  })
}

// @Tags Members
// @Summary 批量删除members表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除members表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /hairmember/members/deleteMembers [delete]
export const deleteMembersByIds = (params) => {
  return service({
    url: '/hairmember/members/deleteMembersByIds',
    method: 'delete',
    params
  })
}

// @Tags Members
// @Summary 更新members表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Members true "更新members表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /hairmember/members/updateMembers [put]
export const updateMembers = (data) => {
  return service({
    url: '/hairmember/members/updateMembers',
    method: 'put',
    data
  })
}

// @Tags Members
// @Summary 用id查询members表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.Members true "用id查询members表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /hairmember/members/findMembers [get]
export const findMembers = (params) => {
  return service({
    url: '/hairmember/members/findMembers',
    method: 'get',
    params
  })
}

// @Tags Members
// @Summary 分页获取members表列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取members表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /hairmember/members/getMembersList [get]
export const getMembersList = (params) => {
  return service({
    url: '/hairmember/members/getMembersList',
    method: 'get',
    params
  })
}

// @Tags Members
// @Summary 不需要鉴权的members表接口
// @Accept application/json
// @Produce application/json
// @Param data query hairmemberReq.MembersSearch true "分页获取members表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /hairmember/members/getMembersPublic [get]
export const getMembersPublic = () => {
  return service({
    url: '/hairmember/members/getMembersPublic',
    method: 'get',
  })
}

// @Tags Members
// @Summary 获取会员充值记录列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "获取会员充值记录列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /hairmember/pay/getMemberRechargeList [get]
export const getMembersRechargeList = (params) => {
  return service({
    url: '/hairmember/recharge/getMemberRechargeList',
    method: 'get',
    params
  })
}

// @Tags Members
// @Summary 会员充值
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body hairmemberReq.RechargeRequest true "会员充值请求"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"充值成功"}"
// @Router /hairmember/recharge/rechargeMember [post]
export const rechargeMember = (data) => {
  return service({
    url: '/hairmember/recharge/rechargeMember',
    method: 'post',
    data
  })
}

// @Tags Members
// @Summary 会员消费扣费
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.MemberConsumption true "会员消费信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"扣费成功"}"
// @Router /hairmember/consume/consumeMember [post]
export const consumeMember = (data) => {
  return service({
    url: 'hairmember/consume/consumeMember',
    method: 'post',
    data
  })
}

// @Tags Members
// @Summary 获取会员消费记录列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "获取会员消费记录列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /hairmember/consume/getMemberConsumptionList [get]
export const getMemberConsumptionList = (params) => {
  return service({
    url: '/hairmember/consume/getMemberConsumptionList',
    method: 'get',
    params
  })
}
